# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Domains.V1beta1.Model.TransferDomainRequest do
  @moduledoc """
  Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Request for the `TransferDomain` method.

  ## Attributes

  *   `authorizationCode` (*type:* `GoogleApi.Domains.V1beta1.Model.AuthorizationCode.t`, *default:* `nil`) - The domain's transfer authorization code. You can obtain this from the domain's current registrar.
  *   `contactNotices` (*type:* `list(String.t)`, *default:* `nil`) - The list of contact notices that you acknowledge. The notices needed here depend on the values specified in `registration.contact_settings`.
  *   `registration` (*type:* `GoogleApi.Domains.V1beta1.Model.Registration.t`, *default:* `nil`) - Required. The complete `Registration` resource to be created. You can leave `registration.dns_settings` unset to import the domain's current DNS configuration from its current registrar. Use this option only if you are sure that the domain's current DNS service does not cease upon transfer, as is often the case for DNS services provided for free by the registrar.
  *   `validateOnly` (*type:* `boolean()`, *default:* `nil`) - Validate the request without actually transferring the domain.
  *   `yearlyPrice` (*type:* `GoogleApi.Domains.V1beta1.Model.Money.t`, *default:* `nil`) - Required. Acknowledgement of the price to transfer or renew the domain for one year. Call `RetrieveTransferParameters` to obtain the price, which you must acknowledge.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :authorizationCode => GoogleApi.Domains.V1beta1.Model.AuthorizationCode.t() | nil,
          :contactNotices => list(String.t()) | nil,
          :registration => GoogleApi.Domains.V1beta1.Model.Registration.t() | nil,
          :validateOnly => boolean() | nil,
          :yearlyPrice => GoogleApi.Domains.V1beta1.Model.Money.t() | nil
        }

  field(:authorizationCode, as: GoogleApi.Domains.V1beta1.Model.AuthorizationCode)
  field(:contactNotices, type: :list)
  field(:registration, as: GoogleApi.Domains.V1beta1.Model.Registration)
  field(:validateOnly)
  field(:yearlyPrice, as: GoogleApi.Domains.V1beta1.Model.Money)
end

defimpl Poison.Decoder, for: GoogleApi.Domains.V1beta1.Model.TransferDomainRequest do
  def decode(value, options) do
    GoogleApi.Domains.V1beta1.Model.TransferDomainRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Domains.V1beta1.Model.TransferDomainRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
